package com.example.xinlijiankangsys.controller;

import com.example.xinlijiankangsys.pojo.Result;
import com.example.xinlijiankangsys.pojo.User;
import com.example.xinlijiankangsys.service.IntiService;
import com.example.xinlijiankangsys.util.ReturnResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class IntiController {

    @Autowired
    private IntiService intiService;

    @GetMapping("/init")
    public Result init(){
        List<User> users =intiService.init();
        return ReturnResultUtil.success(users);
    }
}
